#!/bin/sh
#
# Copyright 2009 VMware, Inc.  All rights reserved. -- VMware Confidential
#
# This script will only ever be called by the 1.0 version of the
# installer.  Notify the user that they are attempting to downgrade
# and that it must be done manually.
#

set -e

case "$1" in
kind)
  # Fake as the tar installer for the WS 6.0 installer
  echo "tar"
  ;;
version)
  # Version 1 for WS 6.0 installer
  echo "1"
  ;;
convertdb)
  # Noop
  ;;
*)
  echo "You have gotten this message because you are either downgrading VMware"
  echo "Workstation, Player, or VIX, or because you attempted to run either"
  echo "vmware-uninstall or vmware-uninstall-vix."
  echo
  echo "If you are downgrading, please uninstall all newer versions first, then"
  echo "install again."
  echo
  echo "The vmware-uninstall* scripts have been deprecated.  Instead, please use"
  echo "the vmware-installer."
  echo
  echo "Long form:"
  echo "      vmware-installer --uninstall-product PRODUCT"
  echo "Short form:"
  echo "      vmware-installer -u PRODUCT"
  echo
  echo "Where PRODUCT is one of vmware-workstation, vmware-player, or vmware-vix."
  echo
  echo "For a list of which products are installed, you may run:"
  echo "      vmware-installer --list-products"
  echo "or:"
  echo "      vmware-installer -l"
  echo
  echo
  exit 1
  ;;
esac
